package com.fzb.zrlog.simple.dao.impl;

import com.fzb.common.dao.impl.DAO;
import com.fzb.zrlog.simple.dao.api.IUserDAO;

import java.sql.SQLException;
import java.util.Map;

public class User extends DAO implements IUserDAO {

    public User() {
        tableName = "user";
        pk = "userId";
    }

    @Override
    public Map<String, Object> login(String userName, String password) {
        try {
            return set("userName", userName).set("password", password).queryFirst(ALL);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public String getPasswordByName(String userName) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public boolean updatePassword(String userName, String password) {
        // TODO Auto-generated method stub
        return false;
    }


}
